#ifndef TEMP_CONTROL_H
#define TEMP_CONTROL_H
#include "stm32f4xx.h"
#include "PID.h"

#define START 1
#define STOP 0


typedef struct temp {
    float expect_temp;
    float real_temp;
    u8 control_flag;
    PIDStruct temp_pid;
} TempStruct;


void temp_struct_init(TempStruct * ts, int16_t max_duty, int16_t min_duty);
void temp_control(TempStruct * ts);
void set_temp_control_state(TempStruct * ts, u8 state);
void temp_control2(TempStruct * ts);

#endif
